package pro.shushi.pamirs.hr.api.model.eam;

import pro.shushi.pamirs.boot.base.ux.annotation.field.UxWidget;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxDetail;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxForm;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTable;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTableSearch;
import pro.shushi.pamirs.hr.api.enums.BooleanConstantEnum;
import pro.shushi.pamirs.hr.api.enums.eam.*;
import pro.shushi.pamirs.hr.api.model.eam.common.AbstractOrgBaseModel;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;

import java.math.BigDecimal;

// 模型中UX开头的注解(UxForm/UxTable/UxDetail等)可以不用写，都可在设计器中进行可视化配置; 代码里面写这些注解是为了默认页面的交互
@UxForm(grid = 3)
@UxDetail(grid = 3)
@Model.model(BsLpnStock.MODEL_MODEL)
@Model(displayName = "LPN库存表",labelFields = {"lpn"})
@Model.Advanced(table="bs_lpn_stock")
public class BsLpnStock extends AbstractOrgBaseModel {

    public static final String MODEL_MODEL = "hr.simple.bsLpnStock";

    @Field(displayName = "LPN代码", required = true)
    private String lpnId;

    @Field(displayName = "组织编码", required = true)
    private String orgCode;

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field(displayName = "LPN")
    public String lpn;

    @Field.Enum(size='4')
    @Field(displayName = "LPN类型", required = true,defaultValue = "0")
    public LpnTypeEnum lpnType;

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field(displayName = "物料编码", required = true)
    public String mtrlCode;

    @Field.Money(M=20,D=6)
    @Field(displayName = "初始数量",required = true)
    public BigDecimal initLpnQty;

    @Field.Money(M=20,D=6)
    @Field(displayName = "数量",required = true)
    public BigDecimal lpnQty;

    @Field.Enum(size='4')
    @Field(displayName = "位置状态", required = true,defaultValue = "1")
    public LocStatEnum locStat;

    @Field.Enum(size='4')
    @Field(displayName = "位置状态", required = true,defaultValue = "1")
    public QltyStatEnum qltyStat;

    @Field.Enum(size='1')
    @Field(displayName = "已报废", required = true, defaultValue = "n")
    public BooleanConstantEnum isScrap;

    @Field.Enum(size='1')
    @Field(displayName = "已退供应商", required = true, defaultValue = "n")
    public BooleanConstantEnum isReturn;

    @Field.Enum(size='1')
    @Field(displayName = "已用毕", required = true, defaultValue = "n")
    public BooleanConstantEnum isUseup;

    @Field.Enum(size='1')
    @Field(displayName = "红牌", required = true, defaultValue = "n")
    public BooleanConstantEnum isRc;


    @Field.Enum(size='1')
    @Field(displayName = "锁定类型", required = true, defaultValue = "0")
    public LpnLockTypeEnum lpnLockType;

    @Field.Text
    @Field(displayName = "备注")
    private String remark;


}
